POV-Ray : Newsgroups : povray.beta-test : spline & macro : spline & macro Server Time
5 Nov 2024 01:21:31 EST (-0500)
  spline & macro  
From: Mael
Date: 10 Sep 2001 05:28:16
Message: <3b9c87b0$1@news.povray.org>
i ve read that splines are still in developement but maybe this can help..

i get a parse error when using a spline in a macro

ex :

camera { location <0,2,-2> look_at 0 }
light_source { <-5,30,-10> 1 }

#declare MySpline =
  spline {
    cubic_spline
    -.25, <0,0,-1>
    0.00, <1,0,0>
    0.25, <0,0,1>
    0.50, <-1,0,0>
    0.75, <0,0,-1>
    1.00, <1,0,0>
    1.25, <0,0,1>
  }

#macro mymacro(apoint)
  apoint
#end

sphere { 0,.1 translate mymacro(MySpline(.5)) pigment {color rgb 1}}


gives :

sphere { 0,.1 translate mymacro(MySpline( <----ERROR
Parse Error: Expected ')', ( found instead

however if i add parenthesis it works

sphere { 0,.1 translate mymacro((MySpline(.5))) pigment {color rgb 1}}

pov3.5b1 win2000 athlon 900MHz 256MB

M


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.